package com.xiaoniu.lib_keleim.utils;

import io.rong.imlib.model.Conversation;

public enum InterceptType {

    SEND(10, "消息发送前拦截器"),

    SERIALIZATION(20, "消息序列化拦截器"),

    ENCODE(30, "私聊加密拦截器"),

    DECODE(40, "消息解密拦截器"),

    PARES(50, "消息反序列化拦截器"),

    RECEIVE(60, "消息接收拦截器");

    private int type;
    private String name;

    private InterceptType(int type, String name) {
        this.type = type;
        this.name = name();
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public void setType(int type) {
        this.type = type;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static InterceptType setValue(int code) {
        InterceptType[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            InterceptType c = var1[var3];
            if (code == c.getType()) {
                return c;
            }
        }

        return RECEIVE;
    }
}